﻿<%@ Control Language="c#" AutoEventWireup="false" Inherits="Web.Control.WWW.Course.Search" %>
<script>
var SortBy="<%=SortBy %>";
</script>
<asp:Literal ID="litCount" Text="15" runat="server" Visible="false"/>
<div class="common">
	<div class="submenunew">
		<div class="submenu_l">
				<div class="unsub">
					<div class="unsubsel"><a href="/teaching/"><span><%=GetText("M0036")%></span></a></div>
					<div><img src="/Images/submenu_arrownone.gif" /></div>
				</div>
				<div class="unsub">
					<div class="unsubsel"><a href="/course/"><span><strong><%=GetText("M0037")%></strong></span></a></div>
					<div><img src="/Images/submenu_arrow.gif" /></div>
				</div>
				<%if (!((Lx.Web.Common.UI.TDTPageBase)Page).IsTeacher){%>
				<div class="unsub">
					<div class="unsubsel"><%if (((Lx.Web.Common.UI.TDTPageBase)Page).IsAffirm){%><a href="/teach/join.htm"><%}else{ %><a href="#" onclick="NotAffirm()"><%} %><span><%=GetText("TP100")%></span></a></div>
					<div><img src="/Images/submenu_arrownone.gif" /></div>
				</div>
				<%} %>
				<div class="cleartm"></div>
		</div>
		<div class="submenu_r"><input id="textKey" type="text" class="common_search" value="<%=Key %>"/><a href="#" id="btsearch" class="buttonimg" onclick="Search()" ><img src="/Images/icon_search19.gif" border="0" class="img" /></a></div>
		<div class="cleartm"></div>
	</div>
</div>
<div class="common">
	<div id="new_body">
		<div id="body_900">
			<div id="body_left"></div>
			<div id="body_main">
<!---->
				<div class="submenuN">
					<div class="submenuN_position">
						<div class="submenuN_title">
							<div class="submenuN_Btitle">
								<h1>
									<%if (STag!="") {%><%=string.Format(GetText("{0} language courses tagged with"),RecordCount)%> <%=STag %>
									<%} else{%>
									<%=GetText("TP045") %>
									<%} %>
								</h1>
							</div>
							<div class="teachers_fliter">
								<table width="100%" border="0" cellspacing="1" cellpadding="5">
									<tr>
										<td valign="top">
											<table border="0" cellspacing="1" cellpadding="0">
												<tr>
													<td><%=GetText("C0016")%><br /><select id="selTeachL" class="common180"> <option value=""><%=GetText("C0027") %></option> <%=GetLanguageSelect(TL)%> </select></td>
													<td><span class="grey12">&nbsp;<%=GetText("TP061")%></span><br />&nbsp;<select id="selLevel" class="common180">
													    <option value=""><%=GetText("TP402") %></option>
													    <option value="1" <%=Level=="1"?"selected='selected'":"" %>><%=GetText("C0019")%></option>
													    <option value="2" <%=Level=="2"?"selected='selected'":"" %>><%=GetText("C0020")%></option>
													    <option value="3" <%=Level=="3"?"selected='selected'":"" %>><%=GetText("C0021")%></option>
													    <option value="4" <%=Level=="4"?"selected='selected'":"" %>><%=GetText("C0022")%></option></select>
													</td>
													<td><span class="grey12">&nbsp;<%=GetText("TP062")%></span><br />&nbsp;<select id="selType" class="common180"> 
											        <option value=""><%=GetText("C0024") %></option>
											        <option value="0" <%=CType=="0"?"selected='selected'":"" %>><%=GetText("WK615") %></option>
											        <option value="1" <%=CType=="1"?"selected='selected'":"" %>><%=GetText("WK616") %></option>
											        <option value="2" <%=CType=="2"?"selected='selected'":"" %>><%=GetText("WK617")%></option>
											        <option value="3" <%=CType=="3"?"selected='selected'":"" %>><%=GetText("WK618")%></option>
											        <option value="4" <%=CType=="4"?"selected='selected'":"" %>><%=GetText("WK619")%></option>
											        <option value="5" <%=CType=="5"?"selected='selected'":"" %>><%=GetText("WK620")%></option>
											        <option value="Z" <%=CType=="Z"?"selected='selected'":"" %>><%=GetText("WK621")%></option>
											    </select></td>
													<td><span class="grey12">&nbsp;<%=TP008%> (<%=GetText("TP016")%>)</span><br />&nbsp;<select class="common130" id="selPrice"> 
											        <option value="0-999999" <%=MinPrice=="0"?"selected='selected'":"" %>>All</option>
											        <option value="0-0">Free</option>
											        <option value="1-50" <%=MinPrice=="1"?"selected='selected'":"" %>>1-50</option>
											        <option value="51-100" <%=MinPrice=="51"?"selected='selected'":"" %>>51-100</option>
											        <option value="101-150" <%=MinPrice=="101"?"selected='selected'":"" %>>101-150</option>
											        <option value="151-200" <%=MinPrice=="151"?"selected='selected'":"" %>>151-200</option>
											        <option value="201-300" <%=MinPrice=="201"?"selected='selected'":"" %>>201-300</option>
											        <option value="300-999999" <%=MinPrice=="300"?"selected='selected'":"" %>>300+</option>
											    </select>
												<%--
												<input id="MinPrice" type="text" value="<%=MinPrice%>" size="4" /> <%=GetText("TP024")%> <input id="MaxPrice" type="text" size="4" value="<%=MaxPrice%>" />--%></td>
												</tr>
											</table>
										</td>
									</tr>
									<tr>
										<td valign="top"><div class="floatl"><a href="#" id="bttSear" name="bttSear_name" onclick="SearBrowseDocs()" class="specbtn"><span>&nbsp;&nbsp;&nbsp;<%=GetText("C0068")%>&nbsp;&nbsp;&nbsp;</span></a></div><div class="floatl">&nbsp;&nbsp;&nbsp;&nbsp;<input id="IsNativeBLID" type="checkbox" <%=(IsNativeBL=="1"?"checked='checked'":"")%> /><%=GetText("CT091")%>&nbsp;&nbsp;&nbsp;&nbsp;<input id="IsFreeID" type="checkbox" <%=(IsFree=="1"?"checked='checked'":"")%>/><%=GetText("TP009")%></div><div class="clear"></div></td>
									</tr>
								</table>
							</div>
							<div class="submenuN_button"><%if (((Lx.Web.Common.UI.TDTPageBase)Page).IsTeacher){%><a href="" class="specgbtn btnspec"><span>Create Course</span></a><%} %></div>
						</div>
					</div>
				</div>
				<div class="Center9001n">
					<div class="center9001right">
						<div class="Center9001Content">
							<div class="teach_area" id="Content828ID">
								<%if (STag!="") {%>
								<%=GetText("More related tags:") %>  
									<%foreach(string rt in RTagList) {%><a href="<%=WWWHost %>/course/tag/<%=rt %>.htm"><%=rt %></a>&nbsp;<%} %>
								<%} %>
								<div class="spectitle2">
									<div>
										<div class="floatl"><%=RowIndexText(PageIndex,psize,rptCourseList.Items.Count,RecordCount,"TP403")%></div>
										<div class="floatr"><ul class="sortby"><li class="sort"><%=GetText("C2017")%>:</li><%=GetSortUrlText()%></ul>
									</div>
										<div class="clear"></div>
									</div>
								</div>
								<!--Search result-->
									<div class="myhome_courses_list">
										<asp:Repeater ID="rptCourseList" runat="server">
											<ItemTemplate> 
											<div class="courses_loop">
												<div class="courses_list_op">
													<div class="course_left">
														<h3><a href="<%#WWWHost %>/course/<%#Eval("CID") %>"><%#Eval("Title") %></a></h3>
														<div class="courses_list_intro grey12"><%#Lx.Web.Common.UI.Globals.GetString(Lx.Web.Common.UI.Globals.HtmlStrippedText(Eval("Desc").ToString()), 120)%></div>
														<%#TP008%>:&nbsp;&nbsp;<span style="color:#e2007b; font-size:14px"><%#string.Format(TP066,((decimal)Eval("Price")).ToString("N0"))%></span>
														<p><%#C0121%>:&nbsp;&nbsp;<%#BLF.StaticData.HaveLanguageImage(Eval("LanguageLearn").ToString())?"<img src='/Images/language_"+Eval("LanguageLearn")+".gif' align='absmiddle' />":"" %>
														<%#GetText("{0} Courses",new string[]{BLF.StaticData.GetLanguageText(Eval("LanguageLearn").ToString())}) %> - <%#BLF.WWW_User.Teach.Teach.GetCTypeText(Eval("CType").ToString())%></p>
														<p><%#C0018%>:&nbsp;&nbsp;<%#BLF.WWW_User.Teach.Teach.GetLevelText(Eval("Level").ToString())%></p>
													</div>
														<div class="floatr card">
															<div class="floatl"><a href="<%#WWWHost %>/<%#Eval("MemberNo") %>T.htm"><img src='<%#Eval("Avatar").ToString() == ""?"/Images/No_pic.gif":Eval("Avatar").ToString() %>' alt="<%#Eval("Nickname") %>" height="50" width="50" /></a><br /></div>
															<div class="floatr"><a href="/<%#Eval("MemberNo") %>T.htm"><%#Eval("Nickname") %></a> <%#Eval("TeacherType").ToString()=="1"? "<p><span class='status_TEdisplay'>"+GetText("C0116") : "<p><span class='status_TUdisplay'>"+GetText("C0120") %></span></p><%#(int)Eval("Sessions") > 0 ? "<span><img src='/images/fbapp_level_" + ((decimal)Eval("StarRate")).ToString("N0") + ".gif' align='absmiddle'  title='" + ((decimal)Eval("StarRate")).ToString("N1") + "'/></span>" : "<span class='grey11'>"+(string.Format(C0102, BLF.StaticData.GetCountryText(Eval("Nationality").ToString())))+"</span>"%>
															</div>
															<div class="cleartm"></div>
														</div>
													<div class="clear"></div>
												</div>
											</div>
											</ItemTemplate>
										</asp:Repeater>
										<%if(rptCourseList.Items.Count==0){ %>没有找到你要的数据<%} %>							    
										<div class="clear"></div>
										<div id="divPage" class="page_num">
										<%if(Key!="") {%>
											<%= CreatePageNav(RecordCount, psize, PageIndex, "",
												string.Format("<span class='page_none grey10'><a href='{0}/course/search.htm?p=$I$&sort={1}&key={2}'>{3}</a></span>&nbsp;", WWWHost,SortBy,HttpUtility.UrlEncode(Key),HttpUtility.UrlEncode(GetText(".."))),
												"",
												string.Format("<span class='page_none grey10'><a href='{0}/course/search.htm?p=$I$&sort={1}&key={2}'>{3}</a></span>&nbsp;", WWWHost,SortBy,HttpUtility.UrlEncode(Key),HttpUtility.UrlEncode(GetText("..."))),
												string.Format("<span class='page_select'>{0}</span>&nbsp;", PageIndex),
												string.Format("<span class='page_none grey10'><a href='{0}/course/search.htm?p=$I$&sort={1}&key={2}'>$I$</a></span>&nbsp;",WWWHost,SortBy,HttpUtility.UrlEncode(Key))
												)
											%>
										<%} else if(STag!=""){%>
											<%= CreatePageNav(RecordCount, psize, PageIndex, "",
												string.Format("<span class='page_none grey10'><a href='{0}/course/tag/{2}.htm?p=$I$&sort={1}'>{3}</a></span>&nbsp;", WWWHost,SortBy,HttpUtility.UrlEncode(STag),HttpUtility.UrlEncode(GetText("..."))),
												"",
												string.Format("<span class='page_none grey10'><a href='{0}/course/tag/{2}.htm?p=$I$&sort={1}'>{3}</a></span>&nbsp;", WWWHost,SortBy,HttpUtility.UrlEncode(STag),HttpUtility.UrlEncode(GetText("..."))),
												string.Format("<span class='page_select'>{0}</span>&nbsp;", PageIndex),
												string.Format("<span class='page_none grey10'><a href='{0}/course/tag/{2}.htm?p=$I$&sort={1}'>$I$</a></span>&nbsp;",WWWHost,SortBy,HttpUtility.UrlEncode(STag))
												)
											%>
										<%} else{%>							
											<%=CreatePageNav(RecordCount, psize, PageIndex, "",
												string.Format("<span class='page_none grey10'><a href='{0}/course/$I$-{1}-{2}-{3}-{4}-{5}-{6}-{7}-{8}.htm'>{9}</a></span>&nbsp;", WWWHost,TL,Level,CType,MinPrice,MaxPrice,IsFree,IsNativeBL,SortBy,HttpUtility.UrlEncode(GetText("..."))),
												"",
												string.Format("<span class='page_none grey10'><a href='{0}/course/$I$-{1}-{2}-{3}-{4}-{5}-{6}-{7}-{8}.htm'>{9}</a></span>&nbsp;", WWWHost,TL,Level,CType,MinPrice,MaxPrice,IsFree,IsNativeBL,SortBy,HttpUtility.UrlEncode(GetText("..."))),
												string.Format("<span class='page_select'>{0}</span>&nbsp;", PageIndex),
												string.Format("<span class='page_none grey10'><a href='{0}/course/$I$-{1}-{2}-{3}-{4}-{5}-{6}-{7}-{8}.htm'>$I$</a></span>&nbsp;",WWWHost,TL,Level,CType,MinPrice,MaxPrice,IsFree,IsNativeBL,SortBy)                                    
												)
											%>
										<%} %>
										</div>
									</div>
							</div>
						</div>
					</div>					
					<div class="center9001left">
						<div class="right_layerA">
							<div class="layer_contentA">
								<h4><%=GetText("C2001")%></h4>
								<div class="layer_contentA5">
									<ul class="tag_common_right">		
										<%foreach(string tag in TagList) {%>					                
										<li><a href="<%=WWWHost %>/course/tag/<%=HttpUtility.UrlEncode(tag) %>.htm"><%=tag %></a></li>
										<%} %>
									</ul>
									<div class="clear"></div>
									<p align="right"><a href="/course/tags.htm"><%=GetText("AS111")%></a></p>
								</div>
							</div>
						</div>
						<div class="ad_site">
						</div>
					</div>
					<div class="clear"></div>
					<div class="teach_area">
						<div class="copyright margin20D"><%=GetText("Most popular languages for language courses")%>: 
							<asp:Repeater ID="rptPopular" runat="server">
								<ItemTemplate>										
									<a href='<%=WWWHost %>/course/teach-<%#Eval("LanguageValue")%>.htm'><%#GetText("{0} courses", new string[] { Eval("LanguageText").ToString()})%></a>	&nbsp;&nbsp;
								</ItemTemplate>
							</asp:Repeater>
						</div>
					</div>
				</div>
			</div>
			<div id="body_right"></div>
			<div class="clear"></div>
		</div>
		<div id="body_900F"></div>
	</div>
</div>